html
	head
		script(src="https://code.jquery.com/jquery-3.2.1.slim.min.js")
		link(href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css", rel="stylesheet", integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u", crossorigin="anonymous")
	body
		nav.navbar.navbar-inverse
			.container
				.navbar-header
					.navbar-brand Annotation Server Authentication
				ul.nav.navbar-right.navbar-nav
					if ! sub
						li
							a(href=`login?from=${from}`) Log in
						li
							a(href="register") Register
					else
						li
							a(href=debugAuth ? sub : false)= 'Logged in as ' + sub.replace(/.*\//, '')
						if debugAuth
							li.dropdown
								a.dropdown-toggle(data-toggle="dropdown") Tokens #[span.caret]
								ul.dropdown-menu
									for c in collectionsAvailable
										li
											a(href=`token/${c}`)= c
						if debugAuth
							li.dropdown
								a.dropdown-toggle(data-toggle="dropdown") Request access #[span.caret]
								ul.dropdown-menu
									for c in collectionsAvailable
										li
											a(href=`request?c=${c}`)= c
		block body
		script(src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js", integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa", crossorigin="anonymous")
